package Test_6;

import java.util.Scanner;

public class AccountNumber_test {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        AccountNumber p=new AccountNumber();//创建账号对象；
        p.name="p1";
        p.password="000000";
        System.out.println("请输入用户名");
        String yonghumin=in.next();
        System.out.println("请输入密码");
        String mima=in.next();
        if (p.password.equals(mima)&&p.name.equals(yonghumin)){
            System.out.println("请输入密码");
            p.password=in.next();
            System.out.println("密码修改成功，您的新密码是"+p.password);
        }else{
            System.out.println("用户名和密码不匹配，您无权更改密码");
        }
    }
}
